<span page-title ng-model="repository">{{ 'Manage deb Packages for Repository:' | translate }} {{ repository.name }}</span>

<div data-block="messages">
  <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>

  <div bst-alert="success" ng-hide="generationTaskId === undefined">
    <button type="button" class="close" ng-click="clearTaskId()">&times;</button>
    <p translate>
      deb metadata generation has been initiated in the background.  Click <a href="{{ taskUrl() }}">Here</a> to monitor the progress.
    </p>
  </div>
</div>

<div data-extend-template="layouts/partials/table.html">
  <div data-block="list-actions">
    <div bst-modal="removeContent()" model="table">
      <div data-block="modal-header"
           translate
           translate-n="table.numSelected"
           translate-plural="Remove {{ table.numSelected }} packages?">
        Remove Package?
      </div>
      <div data-block="modal-body"
           translate
           translate-n="table.numSelected"
           translate-plural="Are you sure you want to remove the {{ table.numSelected }} packages selected?">
        Are you sure you want to remove the {{ table.getSelected()[0].name }} package?
      </div>
    </div>

    <button type="button" class="btn btn-default"
            ng-hide="denied('edit_products')"
            ng-click="openModal()"
            ng-disabled="table.working || table.numSelected === 0">
      <i class="fa fa-trash-o" ng-hide="table.working"></i>
      <span translate>Remove Packages</span>
    </button>
  </div>

  <div data-block="table">
    <table class="table table-striped table-bordered" >

      <thead>
        <tr bst-table-head row-select>
          <th bst-table-column><span translate>Name</span></th>
          <th bst-table-column><span translate>Version</span></th>
          <th bst-table-column><span translate>Architecture</span></th>
        </tr>
      </thead>

      <tbody>
        <tr bst-table-row ng-repeat="deb in table.rows" row-select="deb">
          <td bst-table-cell>
            {{ deb.name }}
          </td>
          <td bst-table-cell>
            {{ deb.version }}
          </td>
          <td bst-table-cell>
            {{ deb.architecture }}
          </td>
        </tr>
      </tbody>

    </table>
  </div>

</div>
